﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;

namespace Survey.Common.Validation
{
    public interface IValidationRule
    {
        ValidateOn ValidateOn { get; }
        ApplyOn ApplyOn { get; }
        string GroupName { get; }
        int Order { get; set; }
        bool BreakOnError { get; set; }

        string GetClientRule(string prefix = null);
        string GetClientMessage(string prefix = null);
    }

    public interface IValidationRule<in TItem> : IValidationRule
        where TItem : class
    {
        ValidationResult Validate(TItem item, out ValidationMessage message);
    }
}